<template>
  <div class="invita">
    <el-table
      :data="table"
      style="width: 100%"
      header-cell-class-name="eltablebg"
    >
      <el-table-column prop="memo" :label="$t('user.invitecount')">
      </el-table-column>
      <el-table-column prop="updated_at" :label="$t('assets.time')">
        <template #default="r">
          <span>{{ formatDate(r.row.time) }}</span>
        </template>
      </el-table-column>
      <el-table-column
        :prop="'+' + Number(value)"
        :label="$t('user.reward1') + '（USDT）'"
      >
        <template #default="r">{{ $currency(r.row.brokerage_value) }}</template>
      </el-table-column>
      <el-table-column :prop="$t('promotion.labels[5]')" :label="$t('assets.status')">
      </el-table-column>
      <template #empty>
        <Norecord />
      </template>
    </el-table>
  </div>
</template>

<script>
import { reactive, onMounted } from "vue";
import Norecord from "@/components/noRecord/NoRecord.vue";
import { formatDate } from "@/utils/times.js";

export default {
  name: "RewardTable",
  components: { Norecord },
  props: { table: Array },
  setup() {
    const state = reactive({});
    /**
     * methods
     */
    onMounted(() => {});

    return {
      state,
      formatDate
    };
  }
};
</script>

<style scoped lang="less">
.invita {
  width: 100%;
}
</style>
